/**
 * Copyright (c) 2006 RiseSoft Co.,Ltd  
 * $Header$
 */
package cn.newtest.bi.collection.model;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

/**
 *
 *
 * @author <a href="mailto: chenjian@risesoft.net">陈健</a>
 * @version $Revision$
 * 
 */
@Entity
@org.hibernate.annotations.Entity(dynamicInsert=true,dynamicUpdate=true)
@Table(name="Rpt_Template_Validation")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Validation implements Serializable {

	private static final long serialVersionUID = 328973550032159795L;
	
	@Id
	@Column(name="tv_GUID",length=38)
	@GenericGenerator(name="Validation-assigned",strategy="assigned")
	private String guid;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="template_GUID")
	private Template template;
	
	@Lob
	@Column(name="alias_Names")
	private String aliasNames;
	
	@Column(name="Validation_name",length=50)
	private String name;
	
	@Column(name="Validation_type",length=50)
	private String type;
	
	@Basic
	private Integer minLength;
	
	@Basic
	private Integer maxLength;
	
	@Column(name="Validation_min")
	private Double min;
	
	@Column(name="Validation_max")
	private Double max;
	
	@Column(name="message",length=400)
	private String message;
	
	@Basic
	private Double tabIndex;
	
	@Basic
	private Boolean required;

	public String getGuid() {
		return guid;
	}

	public void setGuid(String guid) {
		this.guid = guid;
	}

	public Template getTemplate() {
		return template;
	}

	public void setTemplate(Template template) {
		this.template = template;
	}

	public String getAliasNames() {
		return aliasNames;
	}

	public void setAliasNames(String aliasNames) {
		this.aliasNames = aliasNames;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Integer getMinLength() {
		return minLength;
	}

	public void setMinLength(Integer minLength) {
		this.minLength = minLength;
	}

	public Integer getMaxLength() {
		return maxLength;
	}

	public void setMaxLength(Integer maxLength) {
		this.maxLength = maxLength;
	}

	public Double getMin() {
		return min;
	}

	public void setMin(Double min) {
		this.min = min;
	}

	public Double getMax() {
		return max;
	}

	public void setMax(Double max) {
		this.max = max;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Double getTabIndex() {
		return tabIndex;
	}

	public void setTabIndex(Double tabIndex) {
		this.tabIndex = tabIndex;
	}

	public Boolean getRequired() {
		return required;
	}

	public void setRequired(Boolean required) {
		this.required = required;
	}
	
}
